package spring.scope;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainClase2 {
    public static void main(String[] args){
        AbstractApplicationContext ctx = new ClassPathXmlApplicationContext("/Scope.xml");
        ctx.registerShutdownHook();
        
        Reliquia r1 = ctx.getBean("reliquia",Reliquia.class);
        LanzadorDeHachas l1 = ctx.getBean("lanzador", LanzadorDeHachas.class);
        Civilizacion c1 = ctx.getBean("civilizacion", Civilizacion.class);
        Rey rey1 = ctx.getBean("rey", Rey.class);
        ctx.getBean("establo", Establo.class);
        Paladin p = ctx.getBean("paladin", Paladin.class);

        System.out.println(r1);
        System.out.println(l1);
        System.out.println(c1);
        System.out.println(rey1);
        System.out.println(p);


    }

}
